home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2001 May / SGI IRIX Base Documentation 2001 May.iso / usr / share / catman / p_man / cat4 / inittab.z / inittab
Encoding:
Text File  |  1998-10-20  |  12.5 KB  |  265 lines

  1.  
  2.  
  3.  
  4. iiiinnnniiiittttttttaaaabbbb((((4444))))                                                          iiiinnnniiiittttttttaaaabbbb((((4444))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      inittab - script for the init process
  10.  
  11. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  12.      The /_e_t_c/_i_n_i_t_t_a_b file supplies the script to _i_n_i_t's role as a general
  13.      process dispatcher.  The process that constitutes the majority of _i_n_i_t's
  14.      process dispatching activities is the line process /_e_t_c/_g_e_t_t_y that
  15.      initiates individual terminal lines.  Other processes typically
  16.      dispatched by _i_n_i_t are daemons and the shell.
  17.  
  18.      The _i_n_i_t_t_a_b file is composed of entries that are position dependent and
  19.      have the following format:
  20.  
  21.           id:rstate:action:process
  22.  
  23.      Each entry is started with a character other than #### and ended by a
  24.      newline.  Lines starting with #### are ignored.  A backslash (\\\\) preceding a
  25.      newline indicates a continuation of the entry.  Up to 512 characters per
  26.      entry are permitted.  Comments can be inserted in the _p_r_o_c_e_s_s field using
  27.      the _s_h(1) convention for comments.  Comments in the _p_r_o_c_e_s_s field of
  28.      lines that spawn _g_e_t_t_ys are displayed by the _w_h_o(1) command.  Such
  29.      _p_r_o_c_e_s_s field comments can contain information about the line such as its
  30.      location.  There are no limits (other than maximum entry size) imposed on
  31.      the number of entries within the _i_n_i_t_t_a_b file.  The entry fields are:
  32.  
  33.      _i_d        This field, of up to four characters, is used to uniquely
  34.                identify an entry.
  35.  
  36.      _r_s_t_a_t_e    This defines the run-level in which this entry is to be
  37.                processed.  Run-levels effectively correspond to a
  38.                configuration of processes in the system.  That is, each
  39.                process spawned by _i_n_i_t is assigned a run-level or run-levels
  40.                in which it is allowed to exist.
  41.  
  42.                The run-levels are represented by the letter ssss (or SSSS), or a
  43.                number ranging from 0000 through 6666.  As an example, if the system
  44.                is in run-level 1111, only those entries having a 1111 in the _r_s_t_a_t_e
  45.                field are processed.
  46.  
  47.                When _i_n_i_t is requested to change run-levels, all processes that
  48.                do not have an entry in the _r_s_t_a_t_e field for the target run-
  49.                level are sent the warning signal (SSSSIIIIGGGGTTTTEEEERRRRMMMM) and allowed a grace
  50.                period (see _i_n_i_t(1M) for the length of this grace period),
  51.                before being forcibly terminated by a kill signal (SSSSIIIIGGGGKKKKIIIILLLLLLLL).
  52.  
  53.                The _r_s_t_a_t_e field can define multiple run-levels for a process
  54.                by selecting more than one run-level in any combination from
  55.                0000----6666, ssss, and SSSS.  If no run-level is specified, the process is
  56.                assumed to be valid at all run-levels.
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. iiiinnnniiiittttttttaaaabbbb((((4444))))                                                          iiiinnnniiiittttttttaaaabbbb((((4444))))
  71.  
  72.  
  73.  
  74.                There are three other values, aaaa, bbbb, and cccc, that can appear in
  75.                the _r_s_t_a_t_e field, even though they are not true run-levels.
  76.                Entries that have these characters in the _r_s_t_a_t_e field are
  77.                processed only when the _t_e_l_i_n_i_t (see _i_n_i_t(1M)) process requests
  78.                them to be run (regardless of the current run-level of the
  79.                system).  They differ from run-levels in that _i_n_i_t can never
  80.                enter run-level aaaa, bbbb, or cccc.  Also, a request for the execution
  81.                of any of these processes does not change the current run-
  82.                level.  Furthermore, a process started by an aaaa, bbbb, or cccc command
  83.                is not killed when _i_n_i_t changes levels.  They are only killed
  84.                if their line in /_e_t_c/_i_n_i_t_t_a_b is marked ooooffffffff in the _a_c_t_i_o_n
  85.                field, their line is deleted entirely from /_e_t_c/_i_n_i_t_t_a_b, or
  86.                _i_n_i_t goes into the SINGLE USER state.
  87.  
  88.      _a_c_t_i_o_n    Key words in this field tell _i_n_i_t how to treat the process
  89.                specified in the _p_r_o_c_e_s_s field.  The _a_c_t_i_o_ns recognized by _i_n_i_t
  90.                are as follows:
  91.  
  92.                rrrreeeessssppppaaaawwwwnnnn      If the process does not exist then start the
  93.                             process.  Do not wait for its termination
  94.                             (continue scanning the _i_n_i_t_t_a_b file) and when it
  95.                             dies restart the process.  If the process
  96.                             currently exists then do nothing and continue
  97.                             scanning the _i_n_i_t_t_a_b file.
  98.  
  99.                wwwwaaaaiiiitttt         Upon _i_n_i_t's entering the run-level that matches
  100.                             the entry's _r_s_t_a_t_e, start the process and wait for
  101.                             its termination.  All subsequent reads of the
  102.                             _i_n_i_t_t_a_b file while _i_n_i_t is in the same run-level
  103.                             causes _i_n_i_t to ignore this entry.
  104.  
  105.                oooonnnncccceeee         Upon _i_n_i_t's entering a run-level that matches the
  106.                             entry's _r_s_t_a_t_e, start the process, do not wait for
  107.                             its termination.  When it dies, do not restart the
  108.                             process.  If upon entering a new run-level, the
  109.                             process is still running from a previous run-level
  110.                             change, the program is not restarted.
  111.  
  112.                bbbbooooooootttt         The entry is to be processed only at _i_n_i_t's boot-
  113.                             time read of the _i_n_i_t_t_a_b file.  _i_n_i_t is to start
  114.                             the process and not wait for its termination.
  115.                             When it dies, _i_n_i_t does not restart the process.
  116.                             In order for this instruction to be meaningful,
  117.                             the _r_s_t_a_t_e should be the default or it must match
  118.                             _i_n_i_t's run-level at boot time.  This action is
  119.                             useful for an initialization function following a
  120.                             hardware reboot of the system.
  121.  
  122.                bbbboooooooottttwwwwaaaaiiiitttt     The entry is to be processed the first time _i_n_i_t
  123.                             goes from single-user to multi-user state after
  124.                             the system is booted.  (If iiiinnnniiiittttddddeeeeffffaaaauuuulllltttt is set to
  125.                             2222, the process runs right after the boot.)  _i_n_i_t
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. iiiinnnniiiittttttttaaaabbbb((((4444))))                                                          iiiinnnniiiittttttttaaaabbbb((((4444))))
  137.  
  138.  
  139.  
  140.                             starts the process, waits for its termination and,
  141.                             when it dies, does not restart the process.
  142.  
  143.                ppppoooowwwweeeerrrrffffaaaaiiiillll    Execute the process associated with this entry
  144.                             only when _i_n_i_t receives a power fail signal
  145.                             (SSSSIIIIGGGGPPPPWWWWRRRR,,,, see _s_i_g_n_a_l(2)).
  146.  
  147.                ppppoooowwwweeeerrrrwwwwaaaaiiiitttt    Execute the process associated with this entry
  148.                             only when _i_n_i_t receives a power fail signal
  149.                             (SSSSIIIIGGGGPPPPWWWWRRRR) and wait until it terminates before
  150.                             continuing any processing of _i_n_i_t_t_a_b.
  151.  
  152.                ooooffffffff          If the process associated with this entry is
  153.                             currently running, send the warning signal
  154.                             (SSSSIIIIGGGGTTTTEEEERRRRMMMM) and wait 20 seconds before forcibly
  155.                             terminating the process via the kill signal
  156.                             (SSSSIIIIGGGGKKKKIIIILLLLLLLL).  If the process is nonexistent, ignore
  157.                             the entry.
  158.  
  159.                oooonnnnddddeeeemmmmaaaannnndddd     This instruction is really a synonym for the
  160.                             rrrreeeessssppppaaaawwwwnnnn action.  It is functionally identical to
  161.                             rrrreeeessssppppaaaawwwwnnnn but is given a different keyword in order
  162.                             to divorce its association with run-levels.  This
  163.                             is used only with the aaaa, bbbb or cccc values described
  164.                             in the _r_s_t_a_t_e field.
  165.  
  166.                iiiinnnniiiittttddddeeeeffffaaaauuuulllltttt  An entry with this _a_c_t_i_o_n is only scanned when
  167.                             _i_n_i_t initially invoked.  _i_n_i_t uses this entry, if
  168.                             it exists, to determine which run-level to enter
  169.                             initially.  It does this by taking the highest
  170.                             run-level specified in the _r_s_t_a_t_e field and using
  171.                             that as its initial state.  If the _r_s_t_a_t_e field is
  172.                             empty, this is interpreted as 0000111122223333444455556666 and so _i_n_i_t
  173.                             enters run-level 6666.  Additionally, if _i_n_i_t does
  174.                             not find an iiiinnnniiiittttddddeeeeffffaaaauuuulllltttt entry in /_e_t_c/_i_n_i_t_t_a_b, it
  175.                             requests an initial run-level from the user at
  176.                             reboot time.
  177.  
  178.                ssssyyyyssssiiiinnnniiiitttt      Entries of this type are executed before _i_n_i_t
  179.                             tries to access the console (before the CCCCoooonnnnssssoooolllleeee
  180.                             LLLLooooggggiiiinnnn:::: prompt).  It is expected that this entry
  181.                             will be used only to initialize devices on which
  182.                             _i_n_i_t might try to ask the run-level question.
  183.                             These entries are executed and waited for before
  184.                             continuing.
  185.  
  186.      _p_r_o_c_e_s_s   This is a _s_h command to be executed.  The entire pppprrrroooocccceeeessssssss field
  187.                is prefixed with _e_x_e_c and passed to a forked _s_h as sssshhhh ----cccc ''''eeeexxxxeeeecccc
  188.                _c_o_m_m_a_n_d''''.  For this reason, any legal _s_h syntax can appear in
  189.                the _p_r_o_c_e_s_s field.  Comments can be inserted with the
  190.                ;;;; ####_c_o_m_m_e_n_t syntax.
  191.  
  192.  
  193.  
  194.  
  195.                                                                         PPPPaaaaggggeeee 3333
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202. iiiinnnniiiittttttttaaaabbbb((((4444))))                                                          iiiinnnniiiittttttttaaaabbbb((((4444))))
  203.  
  204.  
  205.  
  206. FFFFIIIILLLLEEEESSSS
  207.      /etc/inittab
  208.  
  209. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  210.      getty(1M), init(1M), sh(1), who(1), exec(2), open(2), signal(2).
  211.  
  212.  
  213.  
  214.  
  215.  
  216.  
  217.  
  218.  
  219.  
  220.  
  221.  
  222.  
  223.  
  224.  
  225.  
  226.  
  227.  
  228.  
  229.  
  230.  
  231.  
  232.  
  233.  
  234.  
  235.  
  236.  
  237.  
  238.  
  239.  
  240.  
  241.  
  242.  
  243.  
  244.  
  245.  
  246.  
  247.  
  248.  
  249.  
  250.  
  251.  
  252.  
  253.  
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.                                                                         PPPPaaaaggggeeee 4444
  262.  
  263.  
  264.  
  265.